Add build utility to check cluster health over ssl#40573
Add build utility to check cluster health over ssl#40573tvernum merged 3 commits intoelastic:masterfrom
Conversation
By default, in integ tests we wait for the standalone cluster to start by using the ant Get task to retrieve the cluster health endpoint. However the ant task has no facilities for customising the trusted CAs for a https resource, so if the integ test cluster has TLS enabled on the http interface (using a custom CA) we need a separate utility for that purpose.
|
Pinging @elastic/es-core-infra |
|
@elasticmachine run elasticsearch-ci/2 |
alpar-t
left a comment
There was a problem hiding this comment.
Thanks! I really like this change, much better to have stuff like this in buildSrc implemented in java and with tests.
I left a single comment.
| this.password = password; | ||
| } | ||
|
|
||
| public boolean wait(int durationInMs) throws GeneralSecurityException, InterruptedException, IOException { |
There was a problem hiding this comment.
Could we refactor this to separate the wait/retry logic from the actual check ?
This will be useful for testclusters too, where a boolean return code is not needed and the wait/retry logic is provided for all cluster checks, but even if we don't consider that use-case I think separating these would make it much easier to read.
There was a problem hiding this comment.
👍 to some kind of generic wait and retry utility if we don't already have one.
|
As it is this utility will only work with via HTTPS if some custom truststore info is provided. Do we think we'll ever have a desire to use this yet not provide a custom truststore? |
|
@mark-vieira That's not intentional. If you pass |
|
I think I was reading the logic wrong. I interpreted it to be that an error would be thrown in that case but you are right, it looks like it should just use the default SSLContext in that scenario. Disregard. |
By default, in integ tests we wait for the standalone cluster to start by using the ant Get task to retrieve the cluster health endpoint. However the ant task has no facilities for customising the trusted CAs for a https resource, so if the integ test cluster has TLS enabled on the http interface (using a custom CA) we need a separate utility for that purpose. Resolves: elastic#38072 Backport of: elastic#40573
By default, in integ tests we wait for the standalone cluster to start by using the ant Get task to retrieve the cluster health endpoint. However the ant task has no facilities for customising the trusted CAs for a https resource, so if the integ test cluster has TLS enabled on the http interface (using a custom CA) we need a separate utility for that purpose. Backport of: #40573
By default, in integ tests we wait for the standalone cluster to start by using the ant Get task to retrieve the cluster health endpoint. However the ant task has no facilities for customising the trusted CAs for a https resource, so if the integ test cluster has TLS enabled on the http interface (using a custom CA) we need a separate utility for that purpose. Backport of: elastic#40573
By default, in integ tests we wait for the standalone cluster to start by using the ant Get task to retrieve the cluster health endpoint. However the ant task has no facilities for customising the trusted CAs for a https resource, so if the integ test cluster has TLS enabled on the http interface (using a custom CA) we need a separate utility for that purpose. Backport of: #40573
By default, in integ tests we wait for the standalone cluster to start by using the ant Get task to retrieve the cluster health endpoint. However the ant task has no facilities for customising the trusted CAs for a https resource, so if the integ test cluster has TLS enabled on the http interface (using a custom CA) we need a separate utility for that purpose. Resolves: elastic#38072 Backport of: elastic#40573
By default, in integ tests we wait for the standalone cluster to start by using the ant Get task to retrieve the cluster health endpoint. However the ant task has no facilities for customising the trusted CAs for a https resource, so if the integ test cluster has TLS enabled on the http interface (using a custom CA) we need a separate utility for that purpose. Backport of: #40573
By default, in integ tests we wait for the standalone cluster to start by using the ant Get task to retrieve the cluster health endpoint. However the ant task has no facilities for customising the trusted CAs for a https resource, so if the integ test cluster has TLS enabled on the http interface (using a custom CA) we need a separate utility for that purpose. Resolves: elastic#38072
By default, in integ tests we wait for the standalone cluster to start
by using the ant Get task to retrieve the cluster health endpoint.
However the ant task has no facilities for customising the trusted
CAs for a https resource, so if the integ test cluster has TLS enabled
on the http interface (using a custom CA) we need a separate utility
for that purpose.
Closes: #38072